package net.wofly.sale.order.service.impl;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import net.wofly.sale.order.repository.ValidActivityRepository;
import net.wofly.sale.order.domain.ValidActivity;
import net.wofly.sale.order.service.IValidActivityService;

@Service("iValidActivityService")
@Transactional
public class ValidActivityServiceImpl implements IValidActivityService {

	@Autowired
	ValidActivityRepository validActivityRepository;

	@Override
	public ValidActivity save(ValidActivity entity) {
		return validActivityRepository.save(entity);
	}

	@Override
	public void delete(ValidActivity entity) {
		validActivityRepository.delete(entity);
	}

	@Override
	public void delete(String key) {
		validActivityRepository.delete(key);
	}

	@Override
	public ValidActivity findOne(String key) {
		return validActivityRepository.findOne(key);
	}

	@Override
	public List<ValidActivity> save(List<ValidActivity> entityList) {
		return (List<ValidActivity>) validActivityRepository.save(entityList);
	}
}
